//表格基础样式
.rc-table {
  font-size: 12px;
  color: #666;
  transition: opacity 0.3s ease;
  position: relative;
  line-height: 1.5;
  overflow: hidden;
  //表格超出宽度显示滚动条
  .rc-table-scroll {
    overflow: auto;
    table {
      width: auto;
      min-width: 100%;
    }
  }
  //表头样式
  .rc-table-header {
    overflow: hidden;
    background: #f7f7f7;
  }
}

.rc-table-fixed-header {
  .rc-table-body {
    background: #fff;
    position: relative;
  }
  .rc-table-body-inner {
    height: 100%;
    overflow: scroll;
  }
  //表格头滚动样式
  .rc-table-scroll .rc-table-header {
    overflow-x: scroll;
    padding-bottom: 20px;
    margin-bottom: -20px;
    overflow-y: scroll;
    box-sizing: border-box;
  }
}

.rc-table-fixed-columns-in-body {
  visibility: hidden;
  pointer-events: none;
}

.rc-table {
  .rc-table-title {
    padding: 16px 8px;
    border-top: 1px solid #e9e9e9;
  }
  .rc-table-content {
    position: relative;
  }
  .rc-table-footer {
    padding: 16px 8px;
    border-bottom: 1px solid #e9e9e9;
  }
  .rc-table-placeholder {
    padding: 16px 8px;
    background: #fff;
    border-bottom: 1px solid #e9e9e9;
    text-align: center;
    position: relative;
  }
  .rc-table-placeholder-fixed-columns {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: transparent;
    pointer-events: none;
  }
  table {
    width: 100%;
    text-align: left;
    border-collapse: collapse;
  }
  th {
    background: $table-th-background-color;
    font-family: 	Microsoft YaHei;
    font-size: $text-font-size;
    color: $table-th-font-color;
    border: solid 1px $table-border-color;
    text-align: center!important; /*表格'column'的属性'align'是调整整列的.包含表头.这里是避免样式覆盖*/
    height: $table-th-height;
  }

  td {
    border: solid 1px $table-border-color;
    height: $table-td-height;
    color: $table-td-font-color;
    &:empty:after {
      content: '.';
      visibility: hidden;
    }
  }

  tr {
    transition: all .3s ease;
    &:hover, &.rc-table-row-hover {
      background: #eaf8fe;
    }
  }

  thead tr th:not(:first-child):not(.grouping) {
    border-left: 0;
  }

  thead tr th:not(:last-child):not(.grouping) {
    border-right: 0;
  }

  tbody tr td:not(:first-child) {
    border-left: 0;
  }

  tbody tr td:not(:last-child) {
    border-right: 0;
  }

  thead tr:first-child th:not(.grouping) {
    border-bottom: 0;
  }

  tbody tr:first-child td {
    border-top: 0;
  }

  tbody tr:not(:last-child) td {
    border-bottom: 0;
  }

  tbody tr:not(:first-child) td {
    border-top-color: $table-horizontal-border-color;
  }

  th, td {
    white-space: nowrap;
  }

  a {
    color: $table-a-color;
    text-decoration: none;
  }

  .important-content {
    color: $table-important-content;
  }

}

.rc-table-expand-icon-col {
  width: 34px;
}

//TODO 后续用到 表格行扩展图标 可以勾选的样式
.rc-table-row-expand-icon, .rc-table-expanded-row-expand-icon {
  cursor: pointer;
  display: inline-block;
  width: 16px;
  height: 16px;
  text-align: center;
  line-height: 16px;
  border: 1px solid #e9e9e9;
  user-select: none;
  background: #fff;
}

.rc-table-row-spaced, .rc-table-expanded-row-spaced {
  visibility: hidden;
}

//表格勾选的样式 半选 全选 等
.rc-table-row-spaced:after, .rc-table-expanded-row-spaced:after {
  content: '.';
}

.rc-table-row-expanded:after, .rc-table-expanded-row-expanded:after {
  content: '-';
}

.rc-table-row-collapsed:after, .rc-table-expanded-row-collapsed:after {
  content: '+';
}

tr.rc-table-expanded-row {
  background: #f7f7f7;
  &:hover {
    background: #f7f7f7;
  }
}

.rc-table-column-hidden {
  display: none;
}

.rc-table-prev-columns-page, .rc-table-next-columns-page {
  cursor: pointer;
  color: #666;
  z-index: 1;
}

//表格行鼠标悬浮色
.rc-table-prev-columns-page:hover, .rc-table-next-columns-page:hover {
  color: #2db7f5;
}

//表格禁用色
.rc-table-prev-columns-page-disabled, .rc-table-next-columns-page-disabled {
  cursor: not-allowed;
  color: #999;
}

//表格悬浮禁用色
.rc-table-prev-columns-page-disabled:hover, .rc-table-next-columns-page-disabled:hover {
  color: #999;
}

.rc-table-prev-columns-page {
  margin-right: 8px;
  &:before {
    content: '<';
  }
}

.rc-table-next-columns-page {
  float: right;
  &:before {
    content: '>';
  }
}

.rc-table-fixed-left, .rc-table-fixed-right {
  position: absolute;
  top: 0;
  overflow: hidden;
}

.rc-table-fixed-left table, .rc-table-fixed-right table {
  width: auto;
  background: #fff;
}

.rc-table-fixed-left {
  left: 0;
  box-shadow: 4px 0 4px rgba(100, 100, 100, 0.1);
  .rc-table-body-inner {
    margin-right: -20px;
    padding-right: 20px;
  }
}

.rc-table-fixed-header .rc-table-fixed-left .rc-table-body-inner {
  padding-right: 0;
}

.rc-table-fixed-right {
  right: 0;
  box-shadow: -4px 0 4px rgba(100, 100, 100, 0.1);
  .rc-table-expanded-row {
    color: transparent;
    pointer-events: none;
  }
}

//去掉表格阴影
.rc-table {
  &.rc-table-scroll-position-left .rc-table-fixed-left, &.rc-table-scroll-position-right .rc-table-fixed-right {
    box-shadow: none;
  }
}

//animation.less
.move-enter, .move-appear {
  opacity: 0;
  animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
  animation-duration: 2.5s;
  animation-fill-mode: both;
  animation-play-state: paused;
}

.move-leave {
  animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
  animation-duration: .5s;
  animation-fill-mode: both;
  animation-play-state: paused;
}

.move-enter.move-enter-active, .move-appear.move-enter-active {
  animation-name: moveLeftIn;
  animation-play-state: running;
}

.move-leave.move-leave-active {
  animation-name: moveRightOut;
  animation-play-state: running;
}

@keyframes moveLeftIn {
  0% {
    transform-origin: 0 0;
    transform: translateX(30px);
    opacity: 0;
    background: #fff6de;
  }

  20% {
    transform-origin: 0 0;
    transform: translateX(0);
    opacity: 1;
  }

  80% {
    background: #fff6de;
  }

  100% {
    background: transparent;
    opacity: 1;
  }
}


@keyframes moveRightOut {
  0% {
    transform-origin: 0 0;
    transform: translateX(0);
    opacity: 1;
  }

  100% {
    transform-origin: 0 0;
    transform: translateX(-30px);
    opacity: 0;
  }
}

//表格基础样式
.vertical-table {
  font-size: 12px;
  color: #666;
  transition: opacity 0.3s ease;
  position: relative;
  line-height: 1.5;
  overflow: hidden;
  //表格超出宽度显示滚动条
  .vertical-table-scroll {
    overflow: auto;
    table {
      width: auto;
      min-width: 100%;
    }
  }
  //表头样式
  .vertical-table-header {
    overflow: hidden;
    background: #f7f7f7;
  }
}

.vertical-table-fixed-header {
  .vertical-table-body {
    background: #fff;
    position: relative;
  }
  .vertical-table-body-inner {
    height: 100%;
    overflow: scroll;
  }
  //表格头滚动样式
  .vertical-table-scroll .vertical-table-header {
    overflow-x: scroll;
    padding-bottom: 20px;
    margin-bottom: -20px;
    overflow-y: scroll;
    box-sizing: border-box;
  }
}

.vertical-table-fixed-columns-in-body {
  visibility: hidden;
  pointer-events: none;
}

.vertical-table {
  .vertical-table-title {
    padding: 16px 8px;
    border-top: 1px solid #e9e9e9;
  }
  .vertical-table-content {
    position: relative;
  }
  .vertical-table-footer {
    padding: 16px 8px;
    border-bottom: 1px solid #e9e9e9;
  }
  .vertical-table-placeholder {
    padding: 16px 8px;
    background: #fff;
    border-bottom: 1px solid #e9e9e9;
    text-align: center;
    position: relative;
  }
  .vertical-table-placeholder-fixed-columns {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: transparent;
    pointer-events: none;
  }
  table {
    width: 100%;
    text-align: left;
    border-collapse: collapse;
  }
  th {
    background: $table-th-background-color;
    font-family: 	Microsoft YaHei;
    font-size: $text-font-size;
    color: $table-th-font-color;
    border: solid 1px $table-border-color;
    text-align: center!important; /*表格'column'的属性'align'是调整整列的.包含表头.这里是避免样式覆盖*/
    height: $table-th-height;
  }

  td {
    border: solid 1px $table-border-color;
    height: $table-td-height;
    color: $table-td-font-color;
    &:empty:after {
      content: '.';
      visibility: hidden;
    }
  }

  tr {
    transition: all .3s ease;
    &:hover, &.vertical-table-row-hover {
      background: #eaf8fe;
    }
  }

  tbody tr:not(:last-child) td {
    border-bottom: 0;
  }

  tbody tr:not(:first-child) td {
    border-top-color: $table-horizontal-border-color;
  }

  th, td {
    white-space: nowrap;
  }

  a {
    color: $table-a-color;
    text-decoration: none;
  }

  .important-content {
    color: $table-important-content;
  }

}

.vertical-table-expand-icon-col {
  width: 34px;
}

//TODO 后续用到 表格行扩展图标 可以勾选的样式
.vertical-table-row-expand-icon, .vertical-table-expanded-row-expand-icon {
  cursor: pointer;
  display: inline-block;
  width: 16px;
  height: 16px;
  text-align: center;
  line-height: 16px;
  border: 1px solid #e9e9e9;
  user-select: none;
  background: #fff;
}

.vertical-table-row-spaced, .vertical-table-expanded-row-spaced {
  visibility: hidden;
}

//表格勾选的样式 半选 全选 等
.vertical-table-row-spaced:after, .vertical-table-expanded-row-spaced:after {
  content: '.';
}

.vertical-table-row-expanded:after, .vertical-table-expanded-row-expanded:after {
  content: '-';
}

.vertical-table-row-collapsed:after, .vertical-table-expanded-row-collapsed:after {
  content: '+';
}

tr.vertical-table-expanded-row {
  background: #f7f7f7;
  &:hover {
    background: #f7f7f7;
  }
}

.vertical-table-column-hidden {
  display: none;
}

.vertical-table-prev-columns-page, .vertical-table-next-columns-page {
  cursor: pointer;
  color: #666;
  z-index: 1;
}

//表格行鼠标悬浮色
.vertical-table-prev-columns-page:hover, .vertical-table-next-columns-page:hover {
  color: #2db7f5;
}

//表格禁用色
.vertical-table-prev-columns-page-disabled, .vertical-table-next-columns-page-disabled {
  cursor: not-allowed;
  color: #999;
}

//表格悬浮禁用色
.vertical-table-prev-columns-page-disabled:hover, .vertical-table-next-columns-page-disabled:hover {
  color: #999;
}

.vertical-table-prev-columns-page {
  margin-right: 8px;
  &:before {
    content: '<';
  }
}

.vertical-table-next-columns-page {
  float: right;
  &:before {
    content: '>';
  }
}

.vertical-table-fixed-left, .vertical-table-fixed-right {
  position: absolute;
  top: 0;
  overflow: hidden;
}

.vertical-table-fixed-left table, .vertical-table-fixed-right table {
  width: auto;
  background: #fff;
}

.vertical-table-fixed-left {
  left: 0;
  box-shadow: 4px 0 4px rgba(100, 100, 100, 0.1);
  .vertical-table-body-inner {
    margin-right: -20px;
    padding-right: 20px;
  }
}

.vertical-table-fixed-header .vertical-table-fixed-left .vertical-table-body-inner {
  padding-right: 0;
}

.vertical-table-fixed-right {
  right: 0;
  box-shadow: -4px 0 4px rgba(100, 100, 100, 0.1);
  .vertical-table-expanded-row {
    color: transparent;
    pointer-events: none;
  }
}

//去掉表格阴影
.vertical-table {
  &.vertical-table-scroll-position-left .vertical-table-fixed-left, &.vertical-table-scroll-position-right .vertical-table-fixed-right {
    box-shadow: none;
  }
}
